let url = require("url");

//处理url
let str = "http://www.abc.com:80/hello/index.html?id=12&name=jack#1283223";

// 分解url为对象，如果第二个参数为true，那么也会将查询字符串分解成对象
let urlObj = url.parse(str,true);
// console.log(urlObj);
let {query:{id,name}} = urlObj;
console.log(id);
console.log(name);

